package com.wuc.test.client;

import com.wuc.client.WucParasClient;
import com.wuc.client.domain.PGroup;
import com.wuc.client.domain.Para;

public class ParasTester {
	public static void main(String[] args) {
		WucParasClient client = new WucParasClient("http://127.0.0.1:8380/wuc", "F59BD65F7EDAFB087A81D4DCA06C4910",
				"ApiUser", "111111");
		// client.addGroup("wuc.api.test.one", "接口测试组", "接口测试");
		// client.addGroup("WUC_API_TEST3", "接口测试组3", "接口测试");
		// client.addGroupPara("WUC_API_TEST1", "config.wuc.able", "true", "是否WUC服务",
		// "note");
		// client.addGroupPara("WUC_API_TEST2", "config.wuc.able", "false", null, null);
		// client.addGroupPara("WUC_API_TEST2", "config.wuc.able1", "false", "测试定义参是",
		// "备注");
		// client.putGroupParaVal("WUC_API_TEST2", "config.wuc.able1", "123");
		for (PGroup group : client.getGroups("wuc1")) {
			System.out.println(group.getName());
			System.out.println(group.getGroupkey());
			System.out.println(group.getId());
			System.out.println(group.getState());
			System.out.println("-----------------------------------");
			for (Para para : group.getParas()) {
				System.out.print(para.getKey() + " /");
				System.out.print(para.getName() + " /");
				System.out.println(para.getVal());
			}
			System.out.println("-----------------------------------");
		}
	}
}
